import { ADD, SUB, DDADD, JISHUADD, ODDADD } from "./context"
export const add = data => ({ type: ADD, data })
export const sub = data => ({ type: SUB, data })
export const oddAdd = data => ({ type: ODDADD, data })
export const jishuAdd = data => ({ type: JISHUADD, data })
// export const ddAdd = data => ({ type: DDADD, data })

export const ddAdd = (data, time) => {
    return (dispatch) => {
        setTimeout(() => {
            dispatch(add(data))
        }, time)
    }
}